Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implementing Bivariate Bicycle Codes using 2BGA as the parent via Hecke's Group Algebra #399

Merged
merged 9 commits into from
Nov 5, 2024

Conversation

Fe-r-oz
Copy link
Contributor

@Fe-r-oz Fe-r-oz commented Oct 21, 2024

This PR implements the Bivaraite Bicycle code with parent being 2BGA. This construction is given by ECC Zoo: https://errorcorrectionzoo.org/c/qcga. This is canonically equivalent to #372. This is the third construction method for these codes.

  • The code is properly formatted and commented.
  • Substantial new functionality is documented within the docs.
  • All new functionality is tested.
  • All of the automated tests on github pass.
  • We recently started enforcing formatting checks. If formatting issues are reported in the new code you have written, please correct them. There will be plenty of old code that is flagged as we are slowly transitioning to enforced formatting. Please do not worry about or address older formatting issues -- keep your PR just focused on your planned contribution.

@Fe-r-oz Fe-r-oz changed the title implement Bivaraite Bicycle codes as subset of 2BGA Implementing Bivariate Bicycle Codes using 2BGA as the parent Oct 21, 2024
Copy link

codecov bot commented Oct 21, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 83.07%. Comparing base (40924b8) to head (2f57c53).
Report is 5 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #399      +/-   ##
==========================================
+ Coverage   83.00%   83.07%   +0.06%     
==========================================
  Files          71       71              
  Lines        4560     4560              
==========================================
+ Hits         3785     3788       +3     
+ Misses        775      772       -3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Fe-r-oz Fe-r-oz changed the title Implementing Bivariate Bicycle Codes using 2BGA as the parent Implementing Bivariate Bicycle Codes using 2BGA as the parent via Hecke's Group Algebra Oct 21, 2024
@Fe-r-oz Fe-r-oz marked this pull request as ready for review October 21, 2024 09:50
@Fe-r-oz
Copy link
Contributor Author

Fe-r-oz commented Oct 21, 2024

This PR is ready for review @Krastanov, Thank you!

Tasks Completed:

  • bivariate_bicycle_codes API
  • Documentation and Docstring
  • Testing via test_ecc.jl that calls all other tests such as test_decoder_all_setups.jl
  • Reproducing three different tables from 3 separate papers

After this PR is finished, I will add a canonical equivalence test to #372 using the bivariate_bicycle_codes API defined here to test the following: BB using LP code as parent == BB using 2BGA code as parent. They both are equivalent.

graph TD
    subgraph A[LP]
        B[2BGA]
        subgraph B[2BGA]
            C[BB]
        end
    end
Loading

Edit:

Tommy is introducing group algebras with sparse representation here: thofma/Hecke.jl#1655. I will add this functionality when available! P.S. After review, Tommy decided that sparse representations for GAs should be the default, similar to those in MAGMA, in Hecke v0.34.6, thereby eliminating the need for users to introduce them manually.

Copy link
Member

@Krastanov Krastanov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is probably the addition I am most excited about of the ones I reviewed today. Thank you for looking into it. I have a question about the API design choices.


julia> x, y = gens(GA);

julia> A = [x^3 , y^10 , y^17];
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why write this down as [x^3 , y^10 , y^17] instead of x^3 + y^10 + y^17 and use directly two_block_group_algebra_codes? What is the advantage of the list notation?

Copy link
Contributor Author

@Fe-r-oz Fe-r-oz Nov 5, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are right. For regular abelian groups via Hecke's group algebra, we can use the non-list notation.

The advantage of list notation is when using finitely presented groups from Oscar with specific group presentations which is not related to this PR.

julia> b_elts = 1 +  s + r^6 +  s^3 * r + s * r^7 +  s^3 * r^5;
ERROR: MethodError: no method matching +(::Int64, ::FPGroupElem)
The function `+` exists, but no method is defined for this combination of argument types.

Closest candidates are:
  +(::Any, ::Any, ::Any, ::Any...)
   @ Base operators.jl:596
  +(::Oscar.StraightLinePrograms.Lazy, ::Any)
   @ Oscar ~/.julia/packages/Oscar/2lR8w/src/StraightLinePrograms/lazy.jl:98
  +(::Any, ::Oscar.StraightLinePrograms.Lazy)
   @ Oscar ~/.julia/packages/Oscar/2lR8w/src/StraightLinePrograms/lazy.jl:99
  ...

Stacktrace:
 [1] +(::Int64, ::FPGroupElem, ::FPGroupElem, ::FPGroupElem, ::FPGroupElem, ::FPGroupElem)
   @ Base ./operators.jl:596
 [2] top-level scope
   @ REPL[9]:1

@Fe-r-oz Fe-r-oz force-pushed the fa/BBas2BGA branch 3 times, most recently from 27d9897 to d4a9ef0 Compare November 5, 2024 06:25
Comment on lines 251 to 254
function bivariate_bicycle_codes(A::GroupAlgebraElem, B::GroupAlgebraElem)
c = two_block_group_algebra_codes(A,B)
return c
end
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a followup on my previous question: if now this is all that is needed, why even have a separate function, why not just have two_block_group_algebra_codes and add this as yet another example in the docstring, similar to the other PRs you have on this family of codes

I might be wrong, maybe there is some benefit to keeping a separate function for this class of codes, but such a separate function would need something "special" when compared to two_block_group_algebra_codes

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for these suggestions. I applied the Oscar.FPGroup list notation that Tommy introduced for specific stuff and applied it to Hecke out of curiosity for no particular reason.

@Fe-r-oz
Copy link
Contributor Author

Fe-r-oz commented Nov 5, 2024

Thank you for your suggestions. The PR is ready for review!

By the way, your 2BGA enhancement made the group algebra elements A and B look much prettier.

@Krastanov Krastanov merged commit 5f2ef93 into QuantumSavory:master Nov 5, 2024
5 of 8 checks passed
@Fe-r-oz Fe-r-oz deleted the fa/BBas2BGA branch November 5, 2024 14:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants